package com.yanqu.road.server.manger.config.grandchild.talent.effect;

import com.yanqu.road.entity.grandchild.GrandChildData;
import com.yanqu.road.server.manger.config.grandchild.talent.entity.TalentTriggerSkillParam;
import com.yanqu.road.server.manger.config.grandchild.talent.entity.TalentTriggerSkillResult;
import com.yanqu.road.server.manger.config.grandchild.talent.entity.TalentTriggerSkillResultBuilder;

public class SkillEffect104 implements ISkillEffect {

    @Override
    public TalentTriggerSkillResult getResult(TalentTriggerSkillParam param) {
        GrandChildData data = param.getGrandChild();
        int value = 0;
        boolean isActive = false;
        if (data.getPatronsId() != 0 && data.getPatronsId() == data.getAffinityPatronsId()) { // 加个0判断，避免预览看这怪，正常都不会是0
            value = param.getSkillInfo().getParamList().get(1);
            isActive = true;
        }
        return TalentTriggerSkillResultBuilder.aTalentTriggerSkillResult().setEarnSpeedAddition(value).setActive(isActive).build();
    }

}
